﻿using System;
using System.Runtime.Serialization;

namespace ExplorerService.Common.DataContracts.Operations.OperationProgress
{
    /// <summary>
    /// Base class for operation progress messages
    /// </summary>
    [KnownType(typeof(OperationCompleted))]
    [KnownType(typeof(OperationReceived))]
    [KnownType(typeof(OperationFailedDueToException))]
    [KnownType(typeof(OperationCanceled))]
    [DataContract]
    public class OperationProgress
    {
        /// <summary>
        /// The ID of the operation this progress belongs to
        /// </summary>
        [DataMember]
        public Guid OperationId { get; set; }

        /// <summary>
        /// The current progress of the operation (0-100)
        /// </summary>
        [DataMember]
        public int TotalProgress { get; set; }
    }
}
